<template>
    <h3>我的音乐</h3>
    <p>我的收藏</p>
    <p>我的爱好</p>
    <p>关注明星</p>

    <button @click="btn">跳转到关注页面</button>
    <span @click="onBtn('/parnt','parent')">跳转到find页面去</span>
</template>
<script>
export default {
    data() {
        return {

        }
    },
    methods: {
        btn() { 
            //使用$router.push()   跳转到关注页面
            this.$router.push({ path:'/friend'});
        },
        onBtn(path, name) { 
            this.$router.push({
                // path
                name,
                query: {
                    name: '薛之谦',
                    id:1
                },
                params: {
                    username: '刀郎'
                }
            })
        }
    }

}

</script>
